<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('Goods/index')}">商品管理</a></li>
			<li class="active"><a>商品编辑</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Goods/editPost')}">
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>商品封面</label>
				<div class="col-md-6 col-sm-10">
					<div >
						<input id="photo-1" type="hidden" name="image" value="{$Goods['image']}">
						<input class="form-control" style="width: 300px" id="photo-1-name" type="text"  disabled readonly>

					</div>
					<div style="margin-top: 10px">
						<img src="/upload/{$Goods['image']}" id="photo-1-preview" style="width: 200px"  >
					</div>
					<div style="margin-top: 10px">
						<a class="btn btn-primary" href="javascript:uploadOneImage('图片上传','#photo-1');">上传</a>

					</div>

				</div>
			</div>
<!--			<div class="form-group">-->
<!--				<label class="col-sm-2 control-label">商品图集</label>-->
<!--				<div class="col-md-6 col-sm-10">-->
<!--					<div id="imagesContainer"></div>-->
<!--					<div class="col-md-6 col-sm-10">-->
<!--						<a class="btn btn-default" href="javascript:uploadMultiImage('图片上传','#imagesContainer','photos-item-wrapper');">图片上传</a>-->
<!--					</div>-->
<!--				</div>-->
<!--			</div>-->
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>商品名称</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" style="width: 300px" id="input-name" name="name" value="{$Goods['name']}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-url" class="col-sm-2 control-label"><span class="form-required">*</span>跳转链接</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" style="width: 300px" id="input-url" name="url" value="{$Goods['url']}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-type" class="col-sm-2 control-label"><span class="form-required">*</span>类型</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" style="width: 300px" id="input-type" name="type" value="{$Goods['type']}">
				</div>
			</div>

			<input type="hidden" name="id" value="{$Goods['id']}">
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">

					<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
<!--	<script type="text/html" id="photos-item-wrapper">-->
<!--		<div style="display: flex ; align-items:center;border: 1px solid #ddd;padding: 5px; margin-top: 10px" >-->
<!--			<div><img id="photo-{id}-preview" src="{url}" class="img-thumbnail" style="width: 50px;"></div>-->
<!--			<div style="margin-left: 100px;">{name}</div>-->
<!--			<input id="photo-{id}" type="hidden" name="images[]" value="{filepath}">-->
<!--		</div>-->

<!--	</script>-->
</body>
</html>
